<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/base.css') }}">
<link rel="stylesheet" href="{{ URL::asset('/ucenter/css/bootstrap.min.css') }}">
      <link rel="stylesheet" href="{{ URL::asset('/ucenter/css/personCenter.css') }}">
<style>
   /*按类型,按盈亏*/
.nav-classify-left {
    float: left;
}
  .nav-classify-right {
    float: left;
}
  .nav-classify-left .nav-classify {
    margin-top: 18px;
}
  .nav-classify-left .nav-classify li {
    float: left;
    width: 52px;
    /*height: 60px;*/
    line-height: 20px;
    font-size: 12px;
    text-align: center;
}
.nav-classify-left .nav-classify li:nth-child(5) {
    margin-left: 44px;
}
  .nav-classify-left .nav-classify li a {
    display: block;
    font-size: 12px;
    padding: 0;
}
  .nav-classify-left .nav-classify .line {
    width: 1px;
    height: 14px;
    background-color: #20222c;
    margin-top: 4px;
    margin-right: 8px;
}
  .nav-classify-left .nav-classify li:hover a {
    background-color: #ffffff;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    -ms-border-radius: 2px;
    border-radius: 2px; 
}
  .nav-classify-left .nav-classify li.active a {
    color: #ffffff;
    background-color: #00a8ee;
    -webkit-border-radius: 2px;
    -moz-border-radius: 2px;
    -ms-border-radius: 2px;
    border-radius: 2px;
}
  .nav-classify-left .nav-classify li:nth-child(8) {
    margin-right: 24px;
}

/*交易种类*/
  .nav-classify-type {
    float: left;
}
  .nav-classify-type .nav-classify {
    margin-top: 18px;
    margin-left: 100px;
    float: left;
}
  .nav-classify-type .nav-classify li {
    width: 52px;
    height: 20px;
    line-height: 20px;
    font-size: 12px;
    margin-right: 10px;
}
/*类别:全部的主体内容部分*/
.classify-content {
    width: 100%;
    background-color: #ffffff;
}
.classify-content .all-details .all-title {
    height: 40px;
    margin-bottom: 1px;
    /*box-shadow: 2px 2px 5px 0px #81818b;*/
}

.classify-content .all-details .all-title li {
    float: left;
    width: 10%;
    height: 40px;
    line-height: 40px;
    color: #20222c;
    font-weight: bold;
    text-align: center;
}

.classify-content .all-details .all-content {
    width: 100%;
    background-color: #ffffff;
    /*padding-top: 10px;*/
    position: relative;
    margin-top: 1px;
    margin-bottom: 25px;
}
.classify-content .all-details .all-content ul {
	margin-bottom: 0;
}
.classify-content .all-details .all-content ul li {
    width: 100%;
    height: 50px;
}
.classify-content .all-details .all-content ul div{
    float: left;
    width: 10%;
    height: 50px;
    line-height: 50px;
    font-size: 12px;
    color: #81818b;
}
.classify-content .all-details .all-content ul div span:nth-child(2) {
	position: relative;
	top: -136%;
	left: 0%;
}
.classify-content .all-details .all-content{
	width: 100%;
    background-color: #ffffff;
    /* padding-left: 26px; */
    position: relative;
    text-align: center;
    margin-top: 1px;
}
/*分页按钮*/
#jpage {
    position: absolute;
    bottom: -60px;
    right: 0px;
    font-size: 14px;
}
#jpage > .jpage_div2 > .centerBtns > ul > li{
	width:20px;
	height:20px;
	/*background-color: #3b9ce0;*/
}

#jpage2{
	position:absolute;
	/*bottom:-100px;*/
	right:0px;
}
#jpage2 > .jpage2_div2 > .centerBtns > ul > li{
	width:20px;
	height:20px;
	/*background-color: #3b9ce0;*/
}
#jpage > .jpage_div1 > a:focus {
    text-decoration: none;
}
 /*分页按钮更改样式*/
#jpage > .jpage_div1 > a {
    
    display: block;
    width: 70px;
    height: 30px;
    background-color: #3b9ce0;
    color: #fff;
    border-radius: 2px;
    text-align: center;
    line-height: 30px;
}
a:hover{
	text-decoration: none;
}
</style>
<script type="text/javascript" src="{{ URL::asset('public_js/jquery-3.2.1.min.js') }}"></script>
<script src="{{ URL::asset('public_js/bootstrap.min.js') }}"></script>
<script>
    //page 页码;  pagetype :0 上一页 1 下一页; type : 0订阅分析师下单 1自主下单; dealtype : 1盈利交易 2：亏损交易 ; typename:交易种类
    function gotogendan(page,pagetype,type,dealtype,typename){
       
        typename = $('#typenamechange').val();
        var url = "?page="+(page+1)+"&pagetype="+pagetype+"&type="+type+"&dealtype="+dealtype+"&typename="+typename+"&id="+'{{$id}}';
        url = '{{url("/allgendanlist")}}'+url;
        $(window.parent.document).find("#iframeGendan").attr("src",url);
    }
</script>
 <div class="nav-classify-box">
    <div class="nav-classify-subBox">
	<div class="nav-classify-subTitle">
	    <!--按类别,按盈亏部分-->
	    <div class="nav-classify-left">
	        <ul class="nav nav-tabs-classify nav-classify">
	            <li style="margin-right: 0px;">按类型</li>
	            <li class="line"></li>
	            <li role="presentation" @if($type == 0) class="active" @endif  style="margin-left: 5px"><a href="javascript:;" onclick="gotogendan(0,0,0,'{{$dealtype}}','{{$typename}}')" aria-controls="home" role="tab" data-toggle="tab">订阅</a></li>
	            <li role="presentation" @if($type == 1) class="active" @endif ><a href="javascript:;" onclick="gotogendan(0,0,1,'{{$dealtype}}','{{$typename}}')" aria-controls="profile" role="tab" data-toggle="tab">自主下单</a></li>
	
	            <li style="margin-right: 0px;">按盈亏</li>
	            <li class="line"></li>
	            <li role="presentation" @if($dealtype == 1) class="active" @endif  style="margin-left: 5px"><a href="javascript:;" onclick="gotogendan(0,0,'{{$type}}',1,'{{$typename}}')"aria-controls="home" role="tab" data-toggle="tab">盈利交易</a></li>
	            <li role="presentation" @if($dealtype == 2) class="active" @endif><a href="javascript:;" onclick="gotogendan(0,0,'{{$type}}',2,'{{$typename}}')" aria-controls="profile" role="tab" data-toggle="tab">亏损交易</a></li>
	        </ul>
	    </div>
	
	    <!--交易种类-->
	    <div class="nav-classify-type">
	        <ul class="nav nav-tabs-classify nav-classify">
	            <li>交易种类</li>
	        </ul>
	        <div class="choice">
	            <select onchange="gotogendan(0,0,'{{$type}}','{{$dealtype}}','{{$typename}}')" id="typenamechange" style="width:88px;height:24px;margin-top: 0px;font-size: 14px;">
	                <option value="0">全部</option>
	                @foreach($typenames as $key=>$val)
	                    <option value="{{$val->typename}}" @if($val->typename == $typename) selected="selected" @endif >{{$val->typename}}</option>
	                @endforeach
	            </select>
	        </div>
	    </div>
	</div>
	<div class="classify-content">
	    <div class="tab-content" style="position: relative;">
	        <div role="tabpanel" class="tab-pane active" id="all">
	            <!--全部主体内容部分-->
	            <div class="all-details">
	                <div class="all-title" id="l_gendan_title">
	                    <ul class="all-subTitle">
                                @if($type == 1)
	                        <li>单号</li>
                                @else
                                <li>分析师</li>
                                @endif
	                        <!-- <li>交易员</li> -->
	                        <li>品种</li>
	                        <li>方向</li>
	                        <li>入场价格</li>
	                        <li>入场时间</li>
	                        <li>平仓价格</li>
	                        <li>平仓时间</li>
	                        <li>止盈</li>
	                        <li>止损</li>
	                        <li>最终盈亏</li>
	                    </ul>
	                </div>
                        @if($gendandata)
	                <div class="all-content">
	                    @foreach($gendandata as $key=>$val)
	                        <ul>
	                            <li>
	                                <div alt="{{$val->tradeid}}">@if($type == 1) {{$val->tradeid}} @else {{$val->username}}  @endif</div>
	                                <div>{{$val->typename}}</div>
	                                <div>@if($val->buy_status == 0) 买入 @else 卖出 @endif</div>
	                                <div>{{$val->begin_point}}</div>
	                                <div style="line-height: 54px;">
	                                		<span style="display: inline-block;">{{ date('Y-m-d',$val->begin_time) }}</span>
	                                    <span style="display: inline-block;">{{ date('H:i:s',$val->begin_time) }}</span>
	                                </div>
	                                <div>{{$val->end_point}}</div>
	                                <div style="line-height: 54px;">
	                                    @if($val->end_time)
	                                    		<span style="display: inline-block;">{{ date('Y-m-d',$val->end_time) }}</span>
	                                        <span style="display: inline-block;">{{ date('H:i:s',$val->end_time) }}</span>
	                                    @endif
	                                </div>
	                                <div>{{$val->target_profit_point}}</div>
	                                <div>{{$val->target_loss_point}}</div>
                                        @if($type == 0)
	                                <div>{{$val->profit}}</div>
                                        @else
                                        <div>{{$val->money}}</div>
                                        @endif
	                            </li>
	                        </ul>
	                    @endforeach
	                </div>
                        @endif
	            </div>
	        </div>
	        <!--分页部分-->
                @if($totalpage != 0)
	        <div class="jpage" id="jpage">
	            <div class="jpage_div1">
                        <div style="margin-top:5px;float:right">共{{ $totalpage }}页</div>
	                @if($page != 1 && $page != 0)
	                    <a href="javascript:void(0)" onclick='gotogendan({{$page}},0,"{{$type}}","{{$dealtype}}","{{$typename}}")'  target="iframeGendan" >上一页</a>
	                @else
	                    <a href="javascript:void(0)"  style="background-color: #c2c4c9">上一页</a>                            
                        @endif
                        @if($totalpage != 0)
                            <div style="margin-top:5px">第<span style="color:#3b9ce0">{{ $page }}</span>页</div>
                        @endif
                        
	                @if($page != $totalpage && $page<$totalpage)
	                    <a href="javascript:void(0)"  onclick='gotogendan({{$page}},1,"{{$type}}","{{$dealtype}}","{{$typename}}")' target="iframeGendan">下一页</a>
	                @else
                            <a href="javascript:void(0)" style="background-color: #c2c4c9">下一页</a>
                        @endif
	                
	            </div>
	        </div>
                @endif
	    </div>
	</div>
</div>
</div>
